﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <script src="/js/header.js"></script>
    <link href="/lib/jquery/jquery-ui.min.css" rel="stylesheet" />
    <script src="/lib/jquery/jquery-ui.min.js"></script>
</head>
<body>
    <div class="data-wrap case" id="container">
        <div class="data-tool clearfix">
            <div class="pull-left form-inline " id="addurl">
                <a class="btn btn-default btn-sm" data-modal="/view/sysconfig/edit.html?configId=0" data-title="新增" data-width="452" data-height="305"><span class="glyphicon glyphicon-plus"></span> 新增</a>
            </div>
            <div class="pull-right">
                <form class="form-inline" id="formSearch">
                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">公司名称：</label>
                        <input class="form-control" id="companyName" name="companyName" type="text" autocomplete="off">
                    </div>

                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">分类代码：</label>
                        <input class="form-control" name="configCode" type="text" autocomplete="off"/>
                    </div>

                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">分类名称：</label>
                        <input class="form-control" name="configContent" type="text"  autocomplete="off"/>
                    </div>
                    <button type="button" class="btn btn-default btn-sm active" id="btnSearch"><span class="glyphicon glyphicon-search"></span> 搜索</button>
                </form>
            </div>
        </div>
        <div class="paging">
        </div>

    </div>
    <script type="text/x-dot-template" id="templatePager">
        <div class="data-body data-scroll">
            <div class="data-view">
                <div class="data-div-view table-responsive">
                    <table class="table table-hover table-striped table-bordered">
                        <thead>
                            <tr>
                                <th class="t_l wd200">分类代码</th>
                                <th class="wd75">分类值</th>
                                <th class="t_l">分类名称</th>
                                <th class="t_l wd100">公司名称</th>
                                <th class="t_l">分类说明</th>
                                <th class="wd75">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{? it.tData && it.tData.length>0}}
                            {{~it.tData :item:index}}
                            <tr>
                                <td class="t_l wd200">{{= item.configCode }}</td>
                                <td class="wd75">{{= item.configValue }}</td>
                                <td class="t_l">{{= item.configContent }}</td>
                                <td class="t_l wd100">{{= item.companyName }}</td>
                                <td class="t_l">{{? item.description }}{{= item.description }}{{??}}{{?}}</td>
                                <td class="wd75">
                                    <!--<button type="button" class="btn btn-default btn-xs" data-modal="/view/sysconfig/edit.html?configId={{= item.configId}}" data-title="编辑 - {{= item.configCode }}" data-width="452" data-height="305">
                                        <span class="glyphicon glyphicon-edit"></span> 编辑
                                    </button>-->
                                    <a class="btn btn-danger btn-xs"
                                       data-confirm='"{{= item.configCode }}" <br>确定要<span class="red">删除</span>该参数吗？'
                                       data-href="/SysConfig/SysConfigDelete?configId={{= item.configId}}"><span class="glyphicon glyphicon-trash"></span> 刪除</a>
                                </td>
                            </tr>
                            {{~}}
                            {{??}}
                            <tr class="noRecord">
                                <td colspan="6">暂无记录！</td>
                            </tr>
                            {{?}}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <!-- 必要的分页参数设置 -->
        <input type="hidden" id="TotalCount" value="{{=it.totalCount}}" />
    </script>
    <script type="text/javascript">
        $(function () {
            FlashPay.UI.DataAutoHeight();
            FlashPay.UI.DoSearch();

            $("#btnSearch").click(function () {
                window.currentPage = null;
                doSearch();
            });
        });

        $(document).keyup(function (event) {
            var keycode = event.which;
            if (keycode == 13) {
                FlashPay.UI.DoSearch();
            }
        }); 

        function doSearch() {
            FlashPay.UI.Pager(".paging", { templateId: "templatePager", pageSize: 15, ajax: { url: '/SysConfig/GetPager' } });    
        }

        function Tip_success(word) {
            FlashPay.UI.Tip_success(word);
        }
    </script>
</body>
</html>